package com.lh.customer;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import com.lh.service.DemoService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author hy
 * @description 使用注解的方式创建dubbo项目--客户端
 * @date 2019-10-07
 */
@Component
public class CustomerComponent {

    @Reference(version = "1.0.0", check = true)
//    @Reference
            DemoService demoService;//这里需要使用Dubbo来进行注入

    public String sayHello(String name) {
        return demoService.hello(name);
    }


}



